const state = {
  isCollapse: false,
  selectMenu: [],
};
const mutations = {
  collapseMenu(state) {
    state.isCollapse = !state.isCollapse;
  },
  addMenu(state, payload) {
    let istrue =
      state.selectMenu.findIndex((item) => item.path === payload.path) === -1;
    if (istrue) {
      state.selectMenu.push(payload);
    }
  },
};
const actions = {};
const getters = {};
export default {
  namespaced: true,
  state,
  mutations,
  actions,
  getters,
};
